<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>北大青鸟办公自动化管理系统</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/claim_voucher_edit.js"></script>
</head>
<body onload="setCurTime()">

<div class="top">
    <div class="global-width">
        <img src="../Images/logo.gif" class="logo"/>
    </div>
</div>
<div class="status">
    <div class="global-width">
        <span class="usertype">【登录角色：${EMP.sysPosition.nameCn}】</span>${EMP.name}你好！,您的上级是：${EMP.sysDepartment.sysEmployee.name} ！ 欢迎访问青鸟办公管理系统！
        <a href="empAction!logout.action">注销</a>
    </div>
</div>

<div class="main">
    <div class="global-width">


        <%@include file="../menu.jsp" %>


        <form id="myForm" name="myForm" method="post">
            <div class="action">
                <div class="t">增加报销单</div>
                <div class="pages">
                    <!--增加报销单 区域 开始-->
                    <table width="90%" border="1" cellspacing="0" cellpadding="0" class="addform-base">
                        <caption>基本信息</caption>
                        <tr>
                            <td width="36%">
                                填写人：${EMP.name}
                                <input type="hidden" name="bizClaimVoucher.id" value="${bizClaimVoucher.id}"
                                       id="claimVoucherId"/>
                            </td>
                            <td width="64%">
                                填报时间：
                                <span id="time"></span>
                                <input type="hidden" name="bizClaimVoucher.createTime" id="createTime"
                                       value="${bizClaimVoucher.createTime}"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                总金额：
                                <c:choose>
                                    <c:when test="${sessionScope.bizClaimVoucher == null}">
                                        0.0元
                                    </c:when>
                                    <c:otherwise>
                                        ${sessionScope.bizClaimVoucher.totalAccount}
                                    </c:otherwise>
                                </c:choose>
                                <input type="hidden" name="bizClaimVoucher.totalAccount"
                                       value="${bizClaimVoucher.totalAccount}"/>
                            </td>
                            <td>
                                状态：
                                新创建
                                <input type="hidden" name="bizClaimVoucher.status.value"
                                       value="${bizClaimVoucher.sysDictionary.value}"/>
                            </td>
                        </tr>
                    </table>
                    <p>&nbsp;</p>
                    <table width="90%" border="0" cellspacing="0" cellpadding="0" class="addform-item">
                        <thead>
                        <tr>
                            <td>项目</td>
                            <td>金额</td>
                            <td>费用说明</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <c:forEach items="${bizClaimVoucherDetailList}" var="b">
                            <tr>
                                <td>
                                    <span>
                                            ${b.item}
                                    </span>
                                </td>
                                <td>
                                    <input type="text" value="${b.account}" style="border: none" readonly/>
                                </td>
                                <td>
                                    <input type="text" value="${b.des}" style="border: none" readonly/>
                                </td>
                                <td class = "operating">
                                    <a href="#" onclick="edit($(this),${b.id})">
                                        <img src="/Images/edit.gif" width="16" height="16" title="修改报销单项"/>
                                    </a>
                                    <a href="#" onclick="delDetail('${b.id}')">
                                        <img src="/Images/delete.gif" width="16" height="16" title="删除报销单项"/>
                                    </a>
                                </td>
                            </tr>
                        </c:forEach>
                        <tr>
                            <td>
                                <select name="bizClaimVoucherDetail.item" id="bizClaimVoucherDetailItem">
                                    <option value="城际交通费">城际交通费</option>
                                    <option value="市内交通费">市内交通费</option>
                                    <option value="通讯费">通讯费</option>
                                    <option value="礼品费">礼品费</option>
                                    <option value="办公费">办公费</option>
                                    <option value="交际餐费">交际餐费</option>
                                    <option value="餐补">餐补</option>
                                    <option value="住宿费">住宿费</option>
                                </select>
                            </td>
                            <td>
                                <input type="text" name="bizClaimVoucherDetail.account"
                                       id="bizClaimVoucherDetailAccount"/>
                            </td>
                            <td>
                                <input type="text" name="bizClaimVoucherDetail.des"
                                       id="bizClaimVoucherDetailDes"/>
                            </td>

                            <td  class = "operating">
                                <a href="#" onclick="addDetail()">
                                    <img src="/Images/save.gif" width="16" height="16" title="保存报销单项"/>
                                </a>
                            </td>
                        </tr>
                        <!--报销单事由-->
                        <tr>
                            <td colspan="4" class="event">
                                <label>事 由：</label>
                                <textarea rows="5" cols="66" name="bizClaimVoucher.event"
                                          id="event">${bizClaimVoucher.event}</textarea>
                            </td>
                        </tr>
                        <!--表单提交行-->
                        <tr>
                            <td colspan="4" class="submit">
                                <input type="button" id="1" name="1" value="保存"
                                       onclick="save()" class="submit_01"/>
                                <input type="button" id="2" name="2" value="提交审批"
                                       onclick="submitAll()" class="submit_01"/>
                            </td>
                        </tr>
                    </table>
                    <!--增加报销单 区域 结束-->
                </div>
            </div>
        </form>
    </div>
</div>


<div class="copyright">
    Copyright &nbsp; &copy; &nbsp; 北大青鸟
</div>

</body>
</html>
